//导入资源
import request from '@/utils/request'

//定义路径
const api_name = `/api/hosp/hospital`;
export default {
    //查询医院列表
    getPageList(page, limit, searchObj) {
        return request({
            url: `${api_name}/findHospList/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
    //根据医院名称模糊查询
    getByHospName(hosname) {
        return request({
            url: `${api_name}/findByHospName/${hosname}`,
            method: 'get'
        })
    },
    //根据医院编号获取医院预约挂号详情
    show(hoscode){
        return request({
            url: `${api_name}/findHospDetail/${hoscode}`,
            method: 'get'
        })
    },
    //根据医院编号查询科室信息
    findDepartment(hoscoode){
        return request({
            url: `${api_name}/department/${hoscoode}`,
            mehtod: 'get'
        })
    },
    // 获取可预约排班数据
    getBookingScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `${api_name}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get'
        })
    },
    // 获取排班的具体数据
    findScheduleList(hoscode, depcode, workDate) {
        return request({
            url: `${api_name}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },
    // 根据排班id获取排班数据
    getSchedule(id) {
        return request({
            url: `${api_name}/getSchedule/${id}`,
            method: 'get'
        })
    }
        
    
}